package com.huanxing.cloud.security.exception;

import org.springframework.http.HttpStatus;
/**
 * unauthorized
 *
 * @author lijx
 * @date 2022/6/10
 */
public class UnauthorizedException extends HxExtendOauth2Exception {
  public UnauthorizedException(String msg, Throwable t) {
    super(msg, t);
  }

  @Override
  public String getOAuth2ErrorCode() {
    return "unauthorized";
  }

  @Override
  public int getHttpErrorCode() {
    return HttpStatus.UNAUTHORIZED.value();
  }
}
